Repository navigation
🐛 fix(ci): unfreeze openssl params via tracepoint - #1363
Open
sourabhpatel-sumo wants to merge 1 commit into
Open
sourabhpatel-sumo wants to merge 1 commit into
sourabhpatel-sumo wants to merge 1 commit into
Conversation
rspec-puppet 6 aliases Kernel#require and bundled_gems.rb redefines it, so any require hook breaks. Unfreeze when puppet reopens SSLContext instead. Signed-off-by: Sourabh Patel <sourabh.patel.ctr@sumologic.com>
sourabhpatel-sumo
force-pushed
the
fix/openssl-require-hook
branch
from
November 20, 2026 18:23
43d9767 to
304a958
Compare
Member
Author
|
The acceptance full failure is unrelated to this PR; it also fails on master. Cause: sensuctl >= 6.15.0 quotes integers in |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Unit has failed on
mastersince #1358 merged. Everyraketask crashes at startup:Cause
puppetlabs_spec_helper9.0.1 (released 2026-11-17) requiresrspec-puppet ~> 6.0. 9.0.0 required~> 5.0. #1358's CI last ran on 2026-09-08, before that release, so it passed onrspec-puppet5.0.0.spec/openssl_unfreeze.rbunfreezesOpenSSL::SSL::SSLContext::DEFAULT_PARAMSso puppet 8'smonkey_patches.rbcan mutate it. It did that by hookingKernel#requirewithKernel.prepend.rspec-puppet6 doesalias old_require requireinKernel. Aliasing a method from a prepended module takes it out of the ancestor chain, so itssuperraisesNoMethodError.Both runs below use Ruby 3.4.13 in
ruby:3.4.13, with the original file:NoMethodErrorat startupFix
Stop hooking
require. The first version of this PR used an alias chain instead ofprepend. That fixed Unit, but broke Acceptance Windows: Ruby'sbundled_gems.rbreplacesKernel#requireafter our file loads, which skips an alias-chain hook.puppet module installthen failed withFrozenErrorinmonkey_patches.rb:56. The install step stayed green because PowerShell doesn't stop on a native exit code, and the tests failed withResource type not found: Stdlib::Absolutepath.Each kind of
requirehook breaks under one of these tools, so this version uses aTracePoint(:class)instead. It unfreezesDEFAULT_PARAMSwhen puppet reopensclass OpenSSL::SSL::SSLContext, before the class body runs, whatever else has patchedrequire. A guard stops a second load (Windows loads the file through bothRUBYOPT -rand the Rakefile) from adding a second TracePoint.Testing
Ran in
ruby:3.4.13(linux/amd64), with no lockfile and the same env asunit.yaml. Gems resolved torspec-puppet6.0.1 andopenssl4.0.2.RUBYOPT="-r spec/openssl_unfreeze.rb" bundle exec puppet --version, which is the path that crashed on Windows:FrozenErroratmonkey_patches.rb:568.10.0, also with the file loaded twiceFull Unit steps on the TracePoint version:
rake sensu_validate lint strings:generate reference: cleanrake parallel_spec: 4143 examples, 0 failuresNot fixed here
Acceptance full fails the same way on
masterand on this PR, so it isn't caused by this change.06_postgresql_spec.rbfails becausesensu_postgres_configsendspool_size: "20"as a string:That needs its own PR.